﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Data.SqlClient;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System.IO;

using prjKQXS_UI.Hop_dong;
using prjKQXS_Report;
using prjKQXS_Report.Hop_dong;
using prjKQXS_DLL;

namespace prjKQXS_UI
{
    public partial class frmIn : DevExpress.XtraEditors.XtraForm
    {
        private SqlConnection conn = new SqlConnection(BienTc.connString);
        dsReports ds = new dsReports();

        public frmIn()
        {
            InitializeComponent();
        }

         frmBienDongDlyCap2 frmBienDongDlyCap2 = null;
         public frmIn(frmBienDongDlyCap2 frmBienDongDlyCap2)
         {
             InitializeComponent();
             this.frmBienDongDlyCap2 = frmBienDongDlyCap2;
        
         }
        private void frmIn_Load(object sender, EventArgs e)
        {
            ReportDocument cryRpt = new ReportDocument();
            if (BienTc.Inbaocao == "INHOIDONG")
            {
                rptDMHOIDONG1 rpt = new rptDMHOIDONG1();
                printControl1.PrintingSystem = rpt.PrintingSystem;
                rpt.CreateDocument();
            }
            else
                if (BienTc.Inbaocao == "INDONVI")
                {
                    rptDMDonVi rpt = new rptDMDonVi();
                    printControl1.PrintingSystem = rpt.PrintingSystem;
                    rpt.CreateDocument();
                }
                else
                    if (BienTc.Inbaocao == "INCANBO")
                    {
                        //rptDMCanBo rpt = new rptDMCanBo(BienTc.ma_huyen);
                        //printControl1.PrintingSystem = rpt.PrintingSystem;
                        //rpt.CreateDocument();
                    }
                   
                      
        }
    }
}